package com.fast.cms.model.system;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import com.fast.base.db.model.Commnent;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * ClassName: Dictionary <br/>
 * Function:数据字典 <br/>
 * date: 2014年12月12日 下午3:32:46 <br/>
 * 
 * @author Administrator
 * @version
 * @since JDK 1.6
 */
@Entity
@Table(name = "t_dv_dictionary")
@DynamicInsert(true)
@DynamicUpdate(true)
public class Dictionary implements java.io.Serializable {

	/**
	 * serialVersionUID:提示:.
	 * 
	 * @since JDK 1.7
	 */
	private static final long serialVersionUID = 2279024485895538191L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "id", unique = true, nullable = false, length = 10)
	private int id = 0;// 唯一id
	private String uuid = "";
	private String parentUUID = "";
	private String parentName = "";
	private String dicCode = "";// 标识码
	private String dicname = "";// 字典名称
	private String aliasName = "";
	private String dicdesc = "";// 说明
	private String url = "";
	private String data = "";
	private String dataFormat = "";
	private int sortid = 0;// 排序字段
	private int locked = 1;// 1为解开可以使用,0为锁住不能使用
	private int depth = 0;// 深度

	// =========================foot===================================
	// 操作信息
	@Commnent("编辑人ID")
	@Column(name = "editor_id", length = 11)
	private int editorId = 0;// 编辑人Id
	@Commnent("编辑人")
	@Column(name = "editor_name", length = 32)
	private String editorName = "";// 编辑人
	@Commnent("编辑时间")
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "edit_time")
	private Date editTime;// 编辑时间
	@Commnent("创建人ID")
	@Column(name = "creater_id", length = 11)
	private int createrId = 0;// 编辑人Id
	@Commnent("创建人")
	@Column(name = "creater", length = 32)
	private String creater = "";// 编辑人
	@Commnent("创建时间")
	@Column(name = "create_time", length = 32)
	@Temporal(TemporalType.TIMESTAMP)
	private Date createTime;
	@Commnent("删除标识")
	@Column(name = "delete_flag", length = 1)
	private int deleteFlag = 0;// 默认为不删除，1为删除

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getParentUUID() {
		return parentUUID;
	}

	public void setParentUUID(String parentUUID) {
		this.parentUUID = parentUUID;
	}

	public String getParentName() {
		return parentName;
	}

	public void setParentName(String parentName) {
		this.parentName = parentName;
	}

	public String getDicCode() {
		return dicCode;
	}

	public void setDicCode(String dicCode) {
		this.dicCode = dicCode;
	}

	public String getDicname() {
		return dicname;
	}

	public void setDicname(String dicname) {
		this.dicname = dicname;
	}

	public String getAliasName() {
		return aliasName;
	}

	public void setAliasName(String aliasName) {
		this.aliasName = aliasName;
	}

	public String getDicdesc() {
		return dicdesc;
	}

	public void setDicdesc(String dicdesc) {
		this.dicdesc = dicdesc;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getData() {
		return data;
	}

	public void setData(String data) {
		this.data = data;
	}

	public String getDataFormat() {
		return dataFormat;
	}

	public void setDataFormat(String dataFormat) {
		this.dataFormat = dataFormat;
	}

	public int getSortid() {
		return sortid;
	}

	public void setSortid(int sortid) {
		this.sortid = sortid;
	}

	public int getLocked() {
		return locked;
	}

	public void setLocked(int locked) {
		this.locked = locked;
	}

	public int getDepth() {
		return depth;
	}

	public void setDepth(int depth) {
		this.depth = depth;
	}

	public int getCreaterId() {
		return createrId;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")  
	public Date getEditTime() {
		return editTime;
	}

	public void setEditTime(Date editTime) {
		this.editTime = editTime;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") 
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public int getDeleteFlag() {
		return deleteFlag;
	}

	public void setDeleteFlag(int deleteFlag) {
		this.deleteFlag = deleteFlag;
	}

	public void setCreaterId(int createrId) {
		this.createrId = createrId;
	}

	public String getCreater() {
		return creater;
	}

	public void setCreater(String creater) {
		this.creater = creater;
	}
	
	public int getEditorId() {
		return editorId;
	}

	public void setEditorId(int editorId) {
		this.editorId = editorId;
	}

	public String getEditorName() {
		return editorName;
	}

	public void setEditorName(String editorName) {
		this.editorName = editorName;
	}

	@Override
	public String toString() {
		return "Dictionary [id=" + id + ", uuid=" + uuid + ", parentUUID=" + parentUUID + ", parentName=" + parentName
				+ ", dicCode=" + dicCode + ", dicname=" + dicname + ", aliasName=" + aliasName + ", dicdesc=" + dicdesc
				+ ", url=" + url + ", data=" + data + ", dataFormat=" + dataFormat + ", sortid=" + sortid + ", locked="
				+ locked + ", depth=" + depth + ", editorId=" + editorId + ", editorName=" + editorName + ", editTime="
				+ editTime + ", createrId=" + createrId + ", creater=" + creater + ", createTime=" + createTime
				+ ", deleteFlag=" + deleteFlag + "]";
	}

}
